﻿using System;
using System.Collections.ObjectModel;
using System.Linq;
using Redbrick.Silverlight.Common;

namespace Moria
{

    public class CreatureSpecies
    {

        #region Consts & Settings

        const int MON_NASTY = 50; // 1/x chance of high level creat		

        #endregion Consts & Settings

        #region Declarations

        static int[] m_level;
        private static Lazy<int> maxMonsterLevel = new Lazy<int>(() => Table.Max(ctr => ctr.Level));

        #endregion Declarations

        #region Constructor

        static CreatureSpecies()
        {
            init_m_level();
        }
        
        private CreatureSpecies(string name, uint cmove, int spells, uint cdefense, int mexp, int sleep, int aaf, int ac, int speed, int cchar,int variation, int[] hd, int[] damage, int level)
        {
            this.Name = name;
            this.MoveFlags = (MoveFlag)cmove;
            this.AvailableSpells = (SpellFlag)spells;
            this.DefenseFlags = (DefenseFlag)cdefense;
            this.Experience = mexp;
            this.Sleep = sleep;
            this.AreaAffectRadius = aaf;
            this.ArmorClass = ac;
            this.Speed = speed;
            this.Symbol = cchar;
            this.Variation = variation;
            this.HitDice = new Dice(hd[0], hd[1]);
            this.Damage = damage;
            this.Level = level;
        }
        public CreatureSpecies(int id)
        {
            CreatureSpecies ctr = Table[id];
            this.Name = ctr.Name;
            this.MoveFlags = ctr.MoveFlags;
            this.AvailableSpells = ctr.AvailableSpells;
            this.DefenseFlags = ctr.DefenseFlags;
            this.Experience = ctr.Experience;
            this.Sleep = ctr.Sleep;
            this.AreaAffectRadius = ctr.AreaAffectRadius;
            this.ArmorClass = ctr.ArmorClass;
            this.Speed = ctr.Speed;
            this.Symbol = ctr.Symbol;
            this.Variation = ctr.Variation;
            this.HitDice = ctr.HitDice;
            this.Damage = ctr.Damage;
            this.Level = ctr.Level;
        }

        #endregion Constructor

        #region Methods

        ///<summary>
        /// Initializes M_LEVEL array 
        /// </summary>
        static void init_m_level()
        {
            if (m_level == null)
            {
                m_level = new int[CreatureSpecies.MaxMonsterLevel + 1];
                for (int i = 0; i < m_level.Length; i++)
                {
                    m_level[i] = 0;
                }
                int k = Table.Length - Table.Count(c => c.IsWin);
                for (int i = 0; i < k; i++)
                    m_level[Table[i].Level]++;

                for (int i = 1; i <= CreatureSpecies.MaxMonsterLevel; i++)
                {
                    m_level[i] += m_level[i - 1];
                }
            }
        }
        ///<summary>
        ///Return a monster suitable to be placed at a given level.  This makes
        ///high level monsters (up to the given level) slightly more common than
        ///low level monsters at any given level.   
        ///</summary>
        public static int get_mons_num(int level)
        {
            int i = 0;
            if (level == 0)
            {
                i = Dice.RandInt(m_level[0]) - 1;
            }
            else
            {
                if (level > CreatureSpecies.MaxMonsterLevel) level = CreatureSpecies.MaxMonsterLevel;
                if (Dice.RandInt(MON_NASTY) == 1)
                {
                    i = Dice.RandNor(0, 4);
                    level = level + Math.Abs(i) + 1;
                    if (level > CreatureSpecies.MaxMonsterLevel) level = CreatureSpecies.MaxMonsterLevel;
                }
                else
                {
                    // This code has been added to make it slightly more likely to
                    //get the higher level monsters. Originally a uniform
                    //distribution over all monsters of level less than or equal to the
                    //dungeon level. This distribution makes a level n monster occur
                    //approx 2/n% of the time on level n, and 1/n*n% are 1st level. 

                    int num = m_level[level] - m_level[0];
                    i = Dice.RandInt(num) - 1;
                    int j = Dice.RandInt(num) - 1;
                    if (j > i) i = j;
                    level = Table[i + m_level[0]].Level;
                }
                i = Dice.RandInt(m_level[level] - m_level[level - 1]) - 1 + m_level[level - 1];
            }
            return i;
        }


        #endregion Methods

        #region Events


        #endregion Events

        #region Properties

        public string Name { get; private set; }	// Descrip of creature	
        public MoveFlag MoveFlags { get; private set; }	// Bit field		
        public SpellFlag AvailableSpells { get; private set; }	    // CreatureSpecies spells	
        public DefenseFlag DefenseFlags { get; private set; }	// Bit field		
        public int Experience { get; private set; }		// Exp value for kill	
        public int Sleep { get; private set; }		// Inactive counter/10	
        public int AreaAffectRadius { get; private set; }			// Area affect radius	
        public int ArmorClass { get; private set; }			// AC			
        public int Speed { get; private set; }		// Movement Speed+10	
        public int Symbol { get; private set; }		// Character rep.	
        public int Variation { get; private set; } // species variation (mostly used for UI)
        public Dice HitDice { get; private set; }		// Creatures hit die	
        public int[] Damage { get; private set; }	// Type attack and Damage
        public int Level { get; private set; }		// Level of creature	

        public bool EatsOther { get { return this.MoveFlags.Has(MoveFlag.EatsOther); } }
        public bool CanPhase { get { return this.MoveFlags.Has(MoveFlag.Phase); } }
        public bool IsWin { get { return this.MoveFlags.Has(MoveFlag.Win); } }
        public bool IsInvisible { get { return this.MoveFlags.Has(MoveFlag.Invisible); } }
        public bool IsMultiplying { get { return this.MoveFlags.Has(MoveFlag.Multiply); } }
        public bool IsAttackOnly { get { return this.MoveFlags.Has(MoveFlag.AttackOnly); } }
        public bool IsMagicOnly { get { return this.MoveFlags.Has(MoveFlag.MagicOnly); } }
        public bool MovesNormally { get { return this.MoveFlags.Has(MoveFlag.MoveNormal); } }
        public bool IsRandom20 { get { return this.MoveFlags.Has(MoveFlag.Random20); } }
        public bool IsRandom40 { get { return this.MoveFlags.Has(MoveFlag.Random40); } }
        public bool IsRandom75 { get { return this.MoveFlags.Has(MoveFlag.Random75); } }

        public bool IsEvil { get { return this.DefenseFlags.Has(DefenseFlag.Evil); } }
        public bool IsStone { get { return this.DefenseFlags.Has(DefenseFlag.Stone); } }
        public bool IsUndead { get { return this.DefenseFlags.Has(DefenseFlag.Undead); } }
        public bool IsDragon { get { return this.DefenseFlags.Has(DefenseFlag.Dragon); } }
        public bool IsAnimal { get { return this.DefenseFlags.Has(DefenseFlag.Animal); } }
        public bool IsFrost { get { return this.DefenseFlags.Has(DefenseFlag.Frost); } }
        public bool IsFire { get { return this.DefenseFlags.Has(DefenseFlag.Fire); } }
        public bool CantSleep { get { return this.DefenseFlags.Has(DefenseFlag.NoSleep); } }
        public bool HasInfravision { get { return this.DefenseFlags.Has(DefenseFlag.Infravision); } }
        public bool HasMaxHP { get { return this.DefenseFlags.Has(DefenseFlag.MaxHitpoints); } }
        public bool HasWeakness { get { return this.DefenseFlags.Has(DefenseFlag.Weakness); } }
        public bool HatesLight { get { return this.DefenseFlags.Has(DefenseFlag.Light); } }

        public static int MaxMonsterLevel { get { return maxMonsterLevel.Value; } }
        public static int MaxCreatures { get { return Table.Count(); } }
        public static int WinMonTotal { get { return 2; } }

        #endregion Properties


        public static CreatureSpecies[] Table =
		{
			#region
			new CreatureSpecies("Filthy Street Urchin"	   ,0x0012000A,0x00000000,0x2034,    0,  40,   4,	1, 11, 'p',  0, new int[]{  1 , 4}, new int[]{  72,148,   0,   0},  0),
			new CreatureSpecies("Blubbering Idiot"				,0x0012000A,0x00000000,0x2030,    0,   0,   6,	1, 11, 'p',  1, new int[]{  1 , 2}, new int[]{  79,  0,   0,   0},  0),
			new CreatureSpecies("Pitiful-Looking Beggar"    ,0x0012000A,0x00000000,0x2030,    0,  40,  10,	1, 11, 'p',  2, new int[]{  1 , 4}, new int[]{  72,  0,   0,   0},  0),
			new CreatureSpecies("Mangy-Looking Leper"			,0x0012000A,0x00000000,0x2030,    0,  50,  10,	1, 11, 'p',  3, new int[]{  1 , 1}, new int[]{  72,  0,   0,   0},  0),
			new CreatureSpecies("Squint-Eyed Rogue"		   ,0x07120002,0x00000000,0x2034,    0,  99,  10,	8, 11, 'p',  4, new int[]{  2 , 8}, new int[]{   5,149,   0,   0},  0),
			new CreatureSpecies("Singing, Happy Drunk"	   ,0x06120038,0x00000000,0x2030,    0,   0,  10,	1, 11, 'p',  5, new int[]{  2 , 3}, new int[]{  72,  0,   0,   0},  0),
			new CreatureSpecies("Mean-Looking Mercenary"    ,0x0B12000A,0x00000000,0x2034,    0, 250,  10, 20, 11, 'p',  6, new int[]{  5 , 8}, new int[]{   9,  0,   0,   0},  0),
			new CreatureSpecies("Battle-Scarred Veteran"    ,0x0B12000A,0x00000000,0x2030,    0, 250,  10, 30, 11, 'p',  7, new int[]{  7 , 8}, new int[]{  15,  0,   0,   0},  0),
			new CreatureSpecies("Grey Mushroom patch"			,0x00000001,0x00000000,0x10A0,    1,   0,   2,	1, 11, ',',  0, new int[]{  1 , 2}, new int[]{  91,  0,   0,   0},  1),
			new CreatureSpecies("Giant Yellow Centipede"    ,0x00000002,0x00000000,0x0002,    2,  30,   8, 12, 11, 'c',  0, new int[]{  2 , 6}, new int[]{  26, 60,   0,   0},  1),
			new CreatureSpecies("Giant White Centipede"     ,0x0000000A,0x00000000,0x0002,    2,  40,   7, 10, 11, 'c',  1, new int[]{  3 , 5}, new int[]{  25, 59,   0,   0},  1),
			new CreatureSpecies("White Icky-Thing"				,0x00000012,0x00000000,0x0020,    2,  10,  12,	7, 11, 'i',  0, new int[]{  3 , 5}, new int[]{  63,  0,   0,   0},  1),
			new CreatureSpecies("Clear Icky-Thing"				,0x00010012,0x00000000,0x0020,    1,  10,  12,	6, 11, 'i',  1, new int[]{  2 , 5}, new int[]{  63,  0,   0,   0},  1),
			new CreatureSpecies("Giant White Mouse"	      ,0x0020000A,0x00000000,0x2072,    1,  20,   8,	4, 11, 'r',  0, new int[]{  1 , 3}, new int[]{  25,  0,   0,   0},  1),
			new CreatureSpecies("Large Brown Snake"	      ,0x0000000A,0x00000000,0x00B2,    3,  99,   4, 35, 10, 'R',  0, new int[]{  4 , 6}, new int[]{  26, 73,   0,   0},  1),
			new CreatureSpecies("Large White Snake"	      ,0x00000012,0x00000000,0x00B2,    2,  99,   4, 30, 11, 'R',  1, new int[]{  3 , 6}, new int[]{  24,  0,   0,   0},  1),
			new CreatureSpecies("Kobold"							,0x07020002,0x00000000,0x2030,    5,  10,  20, 16, 11, 'k',  0, new int[]{  3 , 7}, new int[]{   5,  0,   0,   0},  1),
			new CreatureSpecies("White Worm mass"				,0x00200022,0x00000000,0x01B2,    2,  10,   7,	1, 10, 'w',  0, new int[]{  4 , 4}, new int[]{ 173,  0,   0,   0},  1),
			new CreatureSpecies("Floating Eye"					,0x00000001,0x0001000D,0x2100,    1,  10,   2,	6, 11, 'e',  0, new int[]{  3 , 6}, new int[]{ 146,  0,   0,   0},  1),
			new CreatureSpecies("Shrieker Mushroom patch"   ,0x00000001,0x00000000,0x10A0,    1,   0,   2,	1, 11, ',',  1, new int[]{  1 , 1}, new int[]{ 203,  0,   0,   0},  2),
			new CreatureSpecies("Blubbering Icky-Thing"     ,0x0B180012,0x00000000,0x0020,    8,  10,  14,	4, 11, 'i',  2, new int[]{  5 , 8}, new int[]{ 174,210,   0,   0},  2),
			new CreatureSpecies("Metallic Green Centipede"  ,0x00000012,0x00000000,0x0002,    3,  10,   5,	4, 12, 'c',  2, new int[]{  4 , 4}, new int[]{  68,  0,   0,   0},  2),
			new CreatureSpecies("Novice Warrior"				,0x07020002,0x00000000,0x2030,    6,   5,  20, 16, 11, 'p',  8, new int[]{  9 , 4}, new int[]{   6,  0,   0,   0},  2),
			new CreatureSpecies("Novice Rogue"					,0x07020002,0x00000000,0x2034,    6,   5,  20, 12, 11, 'p',  9, new int[]{  8 , 4}, new int[]{   5,148,   0,   0},  2),
			new CreatureSpecies("Novice Priest"	            ,0x07020002,0x0000108C,0x2030,    7,   5,  20, 10, 11, 'p', 10, new int[]{  7 , 4}, new int[]{   4,  0,   0,   0},  2),
			new CreatureSpecies("Novice Mage"					,0x07020002,0x0000089C,0x2030,    7,   5,  20,	6, 11, 'p', 11, new int[]{  6 , 4}, new int[]{   3,  0,   0,   0},  2),
			new CreatureSpecies("Yellow Mushroom patch"     ,0x00000001,0x00000000,0x10A0,    2,   0,   2,	1, 11, ',',  2, new int[]{  1 , 1}, new int[]{ 100,  0,   0,   0},  2),
			new CreatureSpecies("White Jelly"					,0x00000001,0x00000000,0x11A0,   10,  99,   2,	1, 12, 'J',  0, new int[]{  8 , 8}, new int[]{ 168,  0,   0,   0},  2),
			new CreatureSpecies("Giant Green Frog"				,0x0000000A,0x00000000,0x00A2,    6,  30,  12,	8, 11, 'f',  0, new int[]{  2 , 8}, new int[]{  26,  0,   0,   0},  2),
			new CreatureSpecies("Giant Black Ant"				,0x0000000A,0x00000000,0x0002,    8,  80,   8, 20, 11, 'a',  0, new int[]{  3 , 6}, new int[]{  27,  0,   0,   0},  2),
			new CreatureSpecies("White Harpy"					,0x00000012,0x00000000,0x2034,    5,  10,  16, 17, 11, 'h',  0, new int[]{  2 , 5}, new int[]{  49, 49,  25,   0},  2),
			new CreatureSpecies("Blue Yeek"		            ,0x07020002,0x00000000,0x2030,    4,  10,  18, 14, 11, 'y',  0, new int[]{  2 , 6}, new int[]{   4,  0,   0,   0},  2),
			new CreatureSpecies("Green Worm mass"				,0x00200022,0x00000000,0x0132,    3,  10,   7,	3, 10, 'w',  1, new int[]{  6 , 4}, new int[]{ 140,  0,   0,   0},  2),
			new CreatureSpecies("Large Black Snake"	      ,0x0000000A,0x00000000,0x00B2,    9,  75,   5, 38, 10, 'R',  2, new int[]{  4 , 8}, new int[]{  27, 74,   0,   0},  2),
			new CreatureSpecies("Poltergeist"					,0x0F15003A,0x0000001F,0x110C,    6,  10,   8, 15, 13, 'G',  0, new int[]{  2 , 5}, new int[]{  93,  0,   0,   0},  3),
			new CreatureSpecies("Metallic Blue Centipede"   ,0x00000012,0x00000000,0x0002,    7,  15,   6,	6, 12, 'c',  3, new int[]{  4 , 5}, new int[]{  69,  0,   0,   0},  3),
			new CreatureSpecies("Giant White Louse"	      ,0x00200022,0x00000000,0x01F2,    1,  10,   6,	5, 12, 'l',  0, new int[]{  1 , 1}, new int[]{  24,  0,   0,   0},  3),
			new CreatureSpecies("Black Naga"						,0x0710000A,0x00000000,0x20E4,   20, 120,  16, 40, 11, 'n',  0, new int[]{  6 , 8}, new int[]{  75,  0,   0,   0},  3),
			new CreatureSpecies("Spotted Mushroom patch"    ,0x00000001,0x00000000,0x10A0,    3,   0,   2,	1, 11, ',',  3, new int[]{  1 , 1}, new int[]{ 175,  0,   0,   0},  3),
			new CreatureSpecies("Yellow Jelly"					,0x00000001,0x0001000F,0x11A0,   12,  99,   2,	1, 12, 'J',  1, new int[]{ 10 , 8}, new int[]{ 169,  0,   0,   0},  3),
			new CreatureSpecies("Scruffy-Looking Hobbit"    ,0x07020002,0x00000000,0x2034,    4,  10,  16,	8, 11, 'p', 12, new int[]{  3 , 5}, new int[]{   3,148,   0,   0},  3),
			new CreatureSpecies("Huge Brown Bat"				,0x00000022,0x00000000,0x2162,    4,  40,   8, 12, 13, 'b',  0, new int[]{  2 , 6}, new int[]{  25,  0,   0,   0},  3),
			new CreatureSpecies("Giant White Ant"				,0x00000002,0x00000000,0x0002,    7,  80,   8, 16, 11, 'a',  1, new int[]{  3 , 6}, new int[]{  27,  0,   0,   0},  3),
			new CreatureSpecies("Yellow Mold"					,0x00000001,0x00000000,0x10A0,    9,  99,   2, 10, 11, 'm',  0, new int[]{  8 , 8}, new int[]{   3,  0,   0,   0},  3),
			new CreatureSpecies("Metallic Red Centipede"    ,0x0000000A,0x00000000,0x0002,   12,  20,   8,	9, 12, 'c',  4, new int[]{  4 , 8}, new int[]{  69,  0,   0,   0},  3),
			new CreatureSpecies("Yellow Worm mass"				,0x00200022,0x00000000,0x01B2,    4,  10,   7,	4, 10, 'w',  2, new int[]{  4 , 8}, new int[]{ 182,  0,   0,   0},  3),
			new CreatureSpecies("Large Green Snake"	      ,0x0000000A,0x00000000,0x00B2,   10,  70,   5, 40, 10, 'R',  3, new int[]{  6 , 8}, new int[]{  27, 74,   0,   0},  3),
			new CreatureSpecies("Radiation Eye"	            ,0x00000001,0x0001000B,0x2100,    6,  10,   2,	6, 11, 'e',  1, new int[]{  3 , 6}, new int[]{  88,  0,   0,   0},  3),
			new CreatureSpecies("Drooling Harpy"				,0x00000012,0x00000000,0x2034,    7,  10,  16, 22, 11, 'h',  1, new int[]{  2 , 8}, new int[]{  49, 49,  25,  79},  3),
			new CreatureSpecies("Silver Mouse"					,0x0020000A,0x00000000,0x0072,    1,  10,   8,	5, 11, 'r',  1, new int[]{  1 , 1}, new int[]{ 212,  0,   0,   0},  4),
			new CreatureSpecies("Black Mushroom patch"	   ,0x00000001,0x00000000,0x10A0,    8,   0,   2,	1, 11, ',',  4, new int[]{  8 , 8}, new int[]{  71,  0,   0,   0},  4),
			new CreatureSpecies("Blue Jelly"						,0x00000001,0x00000000,0x11A0,   14,  99,   2,	1, 11, 'J',  2, new int[]{ 12 , 8}, new int[]{ 125,  0,   0,   0},  4),
			new CreatureSpecies("Creeping Copper Coins"     ,0x12000002,0x00000000,0x1000,    9,  10,   3, 24, 10, '$',  0, new int[]{  7 , 8}, new int[]{   3,170,   0,   0},  4),
			new CreatureSpecies("Giant White Rat"				,0x0020000A,0x00000000,0x2072,    1,  30,   8,	7, 11, 'r',  2, new int[]{  2 , 2}, new int[]{ 153,  0,   0,   0},  4),
			new CreatureSpecies("Giant Black Centipede"     ,0x0000000A,0x00000000,0x0002,   11,  30,   8, 20, 11, 'c',  5, new int[]{  5 , 8}, new int[]{  25, 59,   0,   0},  4),
			new CreatureSpecies("Giant Blue Centipede"	   ,0x00000002,0x00000000,0x0002,   10,  50,   8, 20, 11, 'c',  6, new int[]{  4 , 8}, new int[]{  26, 61,   0,   0},  4),
			new CreatureSpecies("Blue Worm mass"				,0x00200022,0x00000000,0x01A2,    5,  10,   7, 12, 10, 'w',  3, new int[]{  5 , 8}, new int[]{ 129,  0,   0,   0},  4),
			new CreatureSpecies("Large Grey Snake"				,0x0000000A,0x00000000,0x00B2,   14,  50,   6, 41, 10, 'R',  4, new int[]{  6 , 8}, new int[]{  28, 75,   0,   0},  4),
			new CreatureSpecies("Jackal"							,0x00000012,0x00000000,0x2032,    8,  30,  12, 16, 11, 'j',  0, new int[]{  3 , 8}, new int[]{  29,  0,   0,   0},  4),
			new CreatureSpecies("Green Naga"						,0x0710000A,0x00000000,0x2064,   30, 120,  18, 40, 11, 'n',  1, new int[]{  9 , 8}, new int[]{  75,118,   0,   0},  5),
			new CreatureSpecies("Green Glutton Ghost"			,0x0F150032,0x0000003F,0x110C,   15,  10,  10, 20, 13, 'G',  1, new int[]{  3 , 6}, new int[]{ 211,  0,   0,   0},  5),
			new CreatureSpecies("White Mushroom patch"	   ,0x00000001,0x00000000,0x10A0,    5,   0,   2,	1, 11, ',',  5, new int[]{  1 , 1}, new int[]{ 147,  0,   0,   0},  5),
			new CreatureSpecies("Green Jelly"					,0x00000001,0x00000000,0x1120,   18,  99,   2,	1, 12, 'J',  3, new int[]{ 22 , 8}, new int[]{ 136,  0,   0,   0},  5),
			new CreatureSpecies("Skeleton Kobold"				,0x00020002,0x00000000,0x100C,   12,  40,  20, 26, 11, 's',  0, new int[]{  5 , 8}, new int[]{   5,  0,   0,   0},  5),
			new CreatureSpecies("Silver Jelly"					,0x00000001,0x00000000,0x10A0,   15,  40,	  2, 25, 11, 'J',  4, new int[]{ 20 , 8}, new int[]{ 213,  0,   0,   0},  5),
			new CreatureSpecies("Giant Black Frog"				,0x0000000A,0x00000000,0x00A2,   12,  40,  12, 18, 11, 'f',  1, new int[]{  4 , 8}, new int[]{  29,  0,   0,   0},  5),
			new CreatureSpecies("Grey Icky-Thing"				,0x00000012,0x00000000,0x0020,   10,  15,  14, 12, 11, 'i',  3, new int[]{  4 , 8}, new int[]{  66,  0,   0,   0},  5),
			new CreatureSpecies("Disenchanter Eye"				,0x00000001,0x00010009,0x2100,   20,  10,   2, 10, 10, 'e',  2, new int[]{  7 , 8}, new int[]{ 207,  0,   0,   0},  5),
			new CreatureSpecies("Black Yeek"						,0x07020002,0x00000000,0x2030,    8,  10,  18, 16, 11, 'y',  1, new int[]{  2 , 8}, new int[]{   4,  0,   0,   0},  5),
			new CreatureSpecies("Red Worm mass"					,0x00200022,0x00000000,0x2192,    6,  10,   7, 12, 10, 'w',  4, new int[]{  5 , 8}, new int[]{ 111,  0,   0,   0},  5),
			new CreatureSpecies("Giant House Fly"				,0x00000022,0x00000000,0x0062,   10,  20,  12, 16, 13, 'F',  0, new int[]{  3 , 8}, new int[]{  25,  0,   0,   0},  5),
			new CreatureSpecies("Copperhead Snake"				,0x00000012,0x00000000,0x00B2,   15,   1,   6, 20, 11, 'R',	 5, new int[]{  4 , 6}, new int[]{ 158,  0,   0,   0},  5),
			new CreatureSpecies("Rot Jelly"						,0x00000001,0x00000000,0x10A0,   15,  99,   2, 30, 11, 'J',	 5, new int[]{ 20 , 8}, new int[]{ 209,  0,   0,   0},  5),
			new CreatureSpecies("Purple Mushroom patch"		,0x00000001,0x00000000,0x10A0,   12,   0,   2,	1, 12, ',',	 6, new int[]{  1 , 1}, new int[]{ 183,  0,   0,   0},  6),
			new CreatureSpecies("Brown Mold"						,0x00000001,0x00000000,0x10A0,   20,  99,   2, 12, 11, 'm',	 1, new int[]{ 15 , 8}, new int[]{  89,  0,   0,   0},  6),
			new CreatureSpecies("Giant Brown Bat"				,0x0000001A,0x00000000,0x2162,   10,  30,  10, 15, 13, 'b',	 1, new int[]{  3 , 8}, new int[]{  26,  0,   0,   0},  6),
			new CreatureSpecies("Creeping Silver Coins"		,0x16000002,0x00000000,0x1000,   18,  10,   4, 30, 10, '$',	 1, new int[]{ 12 , 8}, new int[]{   5,171,   0,   0},  6),
			new CreatureSpecies("Orc"								,0x0B020002,0x00000000,0x2034,   16,  30,  20, 32, 11, 'o',  0, new int[]{  9 , 8}, new int[]{   7,  0,   0,   0},  6),
			new CreatureSpecies("Grey Harpy"						,0x00000012,0x00000000,0x2034,   14,  10,  16, 20, 12, 'h',  2, new int[]{  3 , 8}, new int[]{  50, 50,  25,   0},  6),
			new CreatureSpecies("Blue Icky-Thing"				,0x00000012,0x00000000,0x0020,   12,  20,  14, 14, 11, 'i',  4, new int[]{  4 , 8}, new int[]{ 126,  0,   0,   0},  6),
			new CreatureSpecies("Rattlesnake"					,0x00000012,0x00000000,0x00B2,   20,   1,   6, 24, 11, 'R',  6, new int[]{  6 , 7}, new int[]{ 159,  0,   0,   0},  6),
			new CreatureSpecies("Bloodshot Eye"					,0x00000001,0x00010007,0x2100,   15,  10,   2,	6, 11, 'e',  3, new int[]{  4 , 8}, new int[]{ 143,  0,   0,   0},  7),
			new CreatureSpecies("Red Naga"						,0x0710000A,0x00000000,0x20E4,   40, 120,  20, 40, 11, 'n',  2, new int[]{ 11 , 8}, new int[]{  76, 82,   0,   0},  7),
			new CreatureSpecies("Red Jelly"						,0x00000001,0x00000000,0x11A0,   26,  99,   2,	1, 11, 'J',  6, new int[]{ 26 , 8}, new int[]{  87,  0,   0,   0},  7),
			new CreatureSpecies("Giant Red Frog"				,0x0000000A,0x00000000,0x00A2,   16,  50,  12, 16, 11, 'f',  2, new int[]{  5 , 8}, new int[]{  83,  0,   0,   0},  7),
			new CreatureSpecies("Green Icky-Thing"				,0x00000012,0x00000000,0x0020,   18,  20,  14, 12, 11, 'i',  5, new int[]{  5 , 8}, new int[]{ 137,  0,   0,   0},  7),
			new CreatureSpecies("Zombie Kobold"					,0x00020002,0x00000000,0x102C,   14,  30,  20, 14, 11, 'z',  0, new int[]{  6 , 8}, new int[]{   1,  1,   0,   0},  7),
			new CreatureSpecies("Lost Soul"						,0x0F15001A,0x0001002F,0x110C,   18,  10,  12, 10, 11, 'G',  2, new int[]{  2 , 8}, new int[]{  11,185,   0,   0},  7),
			new CreatureSpecies("Greedy Little Gnome"			,0x0B020002,0x00000000,0x2034,   13,  10,  18, 14, 11, 'p', 13, new int[]{  3 , 8}, new int[]{   6,149,   0,   0},  7),
			new CreatureSpecies("Giant Green Fly"				,0x00000022,0x00000000,0x0062,   15,  20,  12, 14, 12, 'F',  1, new int[]{  3 , 8}, new int[]{  27,  0,   0,   0},  7),
			new CreatureSpecies("Brown Yeek"						,0x07020002,0x00000000,0x2030,   11,  10,  18, 18, 11, 'y',  2, new int[]{  3 , 8}, new int[]{   5,  0,   0,   0},  8),
			new CreatureSpecies("Green Mold"						,0x00000001,0x00000000,0x10A0,   28,  75,   2, 14, 11, 'm',  2, new int[]{ 21 , 8}, new int[]{  94,  0,   0,   0},  8),
			new CreatureSpecies("Skeleton Orc"					,0x00020002,0x00000000,0x100C,   26,  40,  20, 36, 11, 's',  1, new int[]{ 10 , 8}, new int[]{  14,  0,   0,   0},  8),
			new CreatureSpecies("Seedy Looking Human"			,0x13020002,0x00000000,0x2034,   22,  20,  20, 26, 11, 'p', 14, new int[]{  8 , 8}, new int[]{  17,  0,   0,   0},  8),
			new CreatureSpecies("Red Icky-Thing"				,0x00000012,0x00000000,0x0020,   22,  20,  14, 18, 12, 'i',  6, new int[]{  4 , 8}, new int[]{  64,117,   0,   0},  8),
			new CreatureSpecies("Bandit"							,0x13020002,0x00000000,0x2034,   26,  10,  20, 24, 11, 'p', 15, new int[]{  8 , 8}, new int[]{  13,148,   0,   0},  8),
			new CreatureSpecies("Yeti"								,0x00020002,0x00000000,0x2024,   30,  10,  20, 24, 11, 'Y',  0, new int[]{ 11 , 8}, new int[]{  51, 51,  27,   0},  9),
			new CreatureSpecies("Bloodshot Icky-Thing"	   ,0x00000012,0x0001000B,0x0020,   24,  20,  14, 18, 11, 'i',  7, new int[]{  7 , 8}, new int[]{  65,139,   0,   0},  9),
			new CreatureSpecies("Giant Grey Rat"				,0x0020000A,0x00000000,0x2072,    2,  20,   8, 12, 11, 'r',  3, new int[]{  2 , 3}, new int[]{ 154,  0,   0,   0},  9),
			new CreatureSpecies("Black Harpy"					,0x0000000A,0x00000000,0x2034,   19,  10,  16, 22, 12, 'h',  3, new int[]{  3 , 8}, new int[]{  50, 50,  26,   0},  9),
			new CreatureSpecies("Giant Black Bat"				,0x00000012,0x00000000,0x2162,   16,  25,  12, 18, 13, 'b',  2, new int[]{  2 , 8}, new int[]{  29,  0,   0,   0},  9),
			new CreatureSpecies("Clear Yeek"						,0x07030002,0x00000000,0x0030,   14,  10,  18, 24, 11, 'y',  3, new int[]{  3 , 6}, new int[]{   4,  0,   0,   0},  9),
			new CreatureSpecies("Orc Shaman"						,0x0B020002,0x00008085,0x2034,   30,  20,  20, 15, 11, 'o',  1, new int[]{  7 , 8}, new int[]{   5,  0,   0,   0},  9),
			new CreatureSpecies("Giant Red Ant"					,0x00000002,0x00000000,0x0002,   22,  60,  12, 34, 11, 'a',  2, new int[]{  4 , 8}, new int[]{  27, 85,   0,   0},  9),
			new CreatureSpecies("King Cobra"						,0x00000012,0x00000000,0x00B2,   28,   1,   8, 30, 11, 'R',  7, new int[]{  8 , 8}, new int[]{ 144,161,   0,   0},  9),
			new CreatureSpecies("Clear Mushroom patch"		,0x00210001,0x00000000,0x10A0,    1,   0,   4,	1, 12, ',',  7, new int[]{  1 , 1}, new int[]{  70,  0,   0,   0}, 10),
			new CreatureSpecies("Giant White Tick"				,0x0000000A,0x00000000,0x0022,   27,  20,  12, 40, 10, 't',  0, new int[]{ 15 , 8}, new int[]{ 160,  0,   0,   0}, 10),
			new CreatureSpecies("Hairy Mold"						,0x00000001,0x00000000,0x10A0,   32,  70,   2, 15, 11, 'm',  3, new int[]{ 15 , 8}, new int[]{ 151,  0,   0,   0}, 10),
			new CreatureSpecies("Disenchanter Mold"			,0x00000001,0x0001000B,0x10A0,   40,  70,   2, 20, 11, 'm',  4, new int[]{ 16 , 8}, new int[]{ 206,  0,   0,   0}, 10),
			new CreatureSpecies("Giant Red Centipede"			,0x00000002,0x00000000,0x0002,   24,  50,  12, 26, 12, 'c',  7, new int[]{  3 , 8}, new int[]{  25,164,   0,   0}, 10),
			new CreatureSpecies("Creeping Gold Coins"			,0x1A000002,0x00000000,0x1000,   32,  10,   5, 36, 10, '$',  2, new int[]{ 18 , 8}, new int[]{  14,172,   0,   0}, 10),
			new CreatureSpecies("Giant Fruit Fly"				,0x00200022,0x00000000,0x0062,    4,  10,   8, 14, 12, 'F',  2, new int[]{  2 , 2}, new int[]{  25,  0,   0,   0}, 10),
			new CreatureSpecies("Brigand"							,0x13020002,0x00000000,0x2034,   35,  10,  20, 32, 11, 'p', 16, new int[]{  9 , 8}, new int[]{  13,149,   0,   0}, 10),
			new CreatureSpecies("Orc Zombie"						,0x00020002,0x00000000,0x102C,   30,  25,  20, 24, 11, 'z',  0, new int[]{ 11 , 8}, new int[]{   3,  3,   0,   0}, 11),
			new CreatureSpecies("Orc Warrior"					,0x0B020002,0x00000000,0x2034,   34,  25,  20, 36, 11, 'o',  2, new int[]{ 11 , 8}, new int[]{  15,  0,   0,   0}, 11),
			new CreatureSpecies("Vorpal Bunny"					,0x0020000A,0x00000000,0x2072,    2,  30,   8, 10, 12, 'r',  4, new int[]{  2 , 3}, new int[]{  28,  0,   0,   0}, 11),
			new CreatureSpecies("Nasty Little Gnome"			,0x13020002,0x000020B5,0x2034,   32,  10,  18, 10, 11, 'p', 17, new int[]{  4 , 8}, new int[]{   4,  0,   0,   0}, 11),
			new CreatureSpecies("Hobgoblin"						,0x0F020002,0x00000000,0x2034,   38,  30,  20, 38, 11, 'H',  0, new int[]{ 12 , 8}, new int[]{   9,  0,   0,   0}, 11),
			new CreatureSpecies("Black Mamba"					,0x00000012,0x00000000,0x00B2,   40,   1,  10, 32, 12, 'R',  8, new int[]{ 10 , 8}, new int[]{ 163,  0,   0,   0}, 12),
			new CreatureSpecies("Grape Jelly"					,0x00000001,0x0001000B,0x11A0,   60,  99,   2,	1, 11, 'J',  7, new int[]{ 52 , 8}, new int[]{ 186,  0,   0,   0}, 12),
			new CreatureSpecies("Master Yeek"					,0x07020002,0x00008018,0x2030,   28,  10,  18, 24, 11, 'y',  4, new int[]{  5 , 8}, new int[]{   7,  0,   0,   0}, 12),
			new CreatureSpecies("Priest"							,0x13020002,0x00000285,0x2030,   36,  40,  20, 22, 11, 'p', 18, new int[]{  7 , 8}, new int[]{  12,  0,   0,   0}, 12),
			new CreatureSpecies("Giant Clear Ant"				,0x00010002,0x00000000,0x0002,   24,  60,  12, 18, 11, 'a',  3, new int[]{  3 , 7}, new int[]{  27,  0,   0,   0}, 12),
			new CreatureSpecies("Air Spirit"						,0x00030022,0x00000000,0x1000,   40,  20,  12, 20, 13, 'E',  0, new int[]{  5 , 8}, new int[]{   2,  0,   0,   0}, 12),
			new CreatureSpecies("Skeleton Human"				,0x00020002,0x00000000,0x100C,   38,  30,  20, 30, 11, 's',  2, new int[]{ 12 , 8}, new int[]{   7,  0,   0,   0}, 12),
			new CreatureSpecies("Human Zombie"					,0x00020002,0x00000000,0x102C,   34,  20,  20, 24, 11, 'z',  1, new int[]{ 11 , 8}, new int[]{   3,  3,   0,   0}, 12),
			new CreatureSpecies("Moaning Spirit"				,0x0F15000A,0x0001002F,0x110C,   44,  10,  14, 20, 11, 'G',  3, new int[]{  4 , 8}, new int[]{  99,178,   0,   0}, 12),
			new CreatureSpecies("Swordsman"						,0x13020002,0x00000000,0x2030,   40,  20,  20, 34, 11, 'p', 19, new int[]{ 11 , 8}, new int[]{  18,  0,   0,   0}, 12),
			new CreatureSpecies("Killer Brown Beetle"			,0x0000000A,0x00000000,0x0002,   38,  30,  10, 40, 11, 'K',  0, new int[]{ 13 , 8}, new int[]{  41,  0,   0,   0}, 13),
			new CreatureSpecies("Ogre"								,0x07020002,0x00000000,0x2034,   42,  30,  20, 32, 11, 'o',  3, new int[]{ 13 , 8}, new int[]{  16,  0,   0,   0}, 13),
			new CreatureSpecies("Giant Red Speckled Frog"	,0x0000000A,0x00000000,0x00A2,   32,  30,  12, 20, 11, 'f',  3, new int[]{  6 , 8}, new int[]{  41,  0,   0,   0}, 13),
			new CreatureSpecies("Magic User"						,0x13020002,0x00002413,0x2030,   35,  10,  20, 10, 11, 'p', 20, new int[]{  7 , 8}, new int[]{  11,  0,   0,   0}, 13),
			new CreatureSpecies("Black Orc"						,0x0B020002,0x00000000,0x2034,   40,  20,  20, 36, 11, 'o',  4, new int[]{ 12 , 8}, new int[]{  17,  0,   0,   0}, 13),
			new CreatureSpecies("Giant Long-Eared Bat"	   ,0x00000012,0x00000000,0x2162,   20,  20,  12, 20, 13, 'b',	 3, new int[]{  5 , 8}, new int[]{  27, 50,  50,   0}, 13),
			new CreatureSpecies("Giant Gnat"						,0x00200022,0x00000000,0x0062,    1,  10,   8,	4, 13, 'F',  3, new int[]{  1 , 2}, new int[]{  24,  0,   0,   0}, 13),
			new CreatureSpecies("Killer Green Beetle"			,0x0000000A,0x00000000,0x0002,   46,  30,  12, 45, 11, 'K',  0, new int[]{ 16 , 8}, new int[]{  43,  0,   0,   0}, 14),
			new CreatureSpecies("Giant Flea"						,0x00200022,0x00000000,0x0062,    1,  10,   8, 25, 12, 'F',  4, new int[]{  2 , 2}, new int[]{  25,  0,   0,   0}, 14),
			new CreatureSpecies("Giant White Dragon Fly"		,0x00000012,0x0040000A,0x0062,   54,  50,  20, 20, 11, 'F',  5, new int[]{  5 , 8}, new int[]{ 122,  0,   0,   0}, 14),
			new CreatureSpecies("Hill Giant"						,0x07020002,0x00000000,0x2034,   52,  50,  20, 36, 11, 'P',  0, new int[]{ 16 , 8}, new int[]{  19,  0,   0,   0}, 14),
			new CreatureSpecies("Skeleton Hobgoblin"			,0x00020002,0x00000000,0x100C,   46,  30,  20, 34, 11, 's',  3, new int[]{ 13 , 8}, new int[]{  14,  0,   0,   0}, 14),
			new CreatureSpecies("Flesh Golem"					,0x00000002,0x00000000,0x1030,   48,  10,  12, 10, 11, 'g',  0, new int[]{ 12 , 8}, new int[]{   5,  5,   0,   0}, 14),
			new CreatureSpecies("White Dragon Bat"				,0x00000012,0x00400004,0x0162,   40,  50,  12, 20, 13, 'b',  4, new int[]{  2 , 6}, new int[]{ 121,  0,   0,   0}, 14),
			new CreatureSpecies("Giant Black Louse"			,0x00200012,0x00000000,0x01F2,    1,  10,   6,	7, 12, 'l',  1, new int[]{  1 , 1}, new int[]{  25,  0,   0,   0}, 14),
			new CreatureSpecies("Guardian Naga"					,0x1710000A,0x00000000,0x20E4,   60, 120,  20, 50, 11, 'n',  3, new int[]{ 24 , 8}, new int[]{  77, 31,   0,   0}, 15),
			new CreatureSpecies("Giant Grey Bat"				,0x00000012,0x00000000,0x2162,   22,  15,  12, 22, 13, 'b',  5, new int[]{  4 , 8}, new int[]{  29, 50,  50,   0}, 15),
			new CreatureSpecies("Giant Clear Centipede"		,0x00010002,0x00000000,0x0002,   30,  30,  12, 30, 11, 'c',  8, new int[]{  5 , 8}, new int[]{  34, 62,   0,   0}, 15),
			new CreatureSpecies("Giant Yellow Tick"			,0x0000000A,0x00000000,0x0022,   48,  20,  12, 48, 10, 't',  1, new int[]{ 20 , 8}, new int[]{ 162,  0,   0,   0}, 15),
			new CreatureSpecies("Giant Ebony Ant"				,0x00200002,0x00000000,0x0002,    3,  60,  12, 24, 11, 'a',  4, new int[]{  3 , 4}, new int[]{  33,  0,   0,   0}, 15),
			new CreatureSpecies("Frost Giant"					,0x07020002,0x00000000,0x0024,   54,  50,  20, 38, 11, 'P',  1, new int[]{ 17 , 8}, new int[]{ 120,  0,   0,   0}, 15),
			new CreatureSpecies("Clay Golem"						,0x00000002,0x00000000,0x1200,   50,  10,  12, 20, 11, 'g',  1, new int[]{ 14 , 8}, new int[]{   7,  7,   0,   0}, 15),
			new CreatureSpecies("Huge White Bat"				,0x00200012,0x00000000,0x2162,    3,  40,   7, 12, 12, 'b',  6, new int[]{  3 , 8}, new int[]{  29,  0,   0,   0}, 15),
			new CreatureSpecies("Giant Tan Bat"					,0x00000012,0x00000000,0x2162,   18,  40,  12, 18, 12, 'b',  7, new int[]{  3 , 8}, new int[]{  95, 49,  49,   0}, 15),
			new CreatureSpecies("Violet Mold"					,0x00000001,0x00010009,0x10A0,   50,  70,   2, 15, 11, 'm',  5, new int[]{ 17 , 8}, new int[]{ 145,  0,   0,   0}, 15),
			new CreatureSpecies("Umber Hulk"						,0x00020002,0x00000000,0x2124,   75,  10,  20, 20, 11, 'U',  0, new int[]{ 20 , 8}, new int[]{  92,  5,   5,  36}, 16),
			new CreatureSpecies("Gelatinous Cube"				,0x2F18000A,0x00000000,0x1020,   36,   1,  12, 18, 10, 'C',  0, new int[]{ 45 , 8}, new int[]{ 115,  0,   0,   0}, 16),
			new CreatureSpecies("Giant Black Rat"				,0x0020000A,0x00000000,0x2072,    3,  20,   8, 16, 11, 'r',  5, new int[]{  3 , 4}, new int[]{ 155,  0,   0,   0}, 16),
			new CreatureSpecies("Giant Green Dragon Fly"		,0x00000012,0x0010000A,0x0032,   58,  50,  20, 20, 11, 'F',  6, new int[]{  5 , 8}, new int[]{ 156,  0,   0,   0}, 16),
			new CreatureSpecies("Fire Giant"						,0x07020002,0x00000000,0x2014,   62,  50,  20, 40, 11, 'P',  2, new int[]{ 20 , 8}, new int[]{ 102,  0,   0,   0}, 16),
			new CreatureSpecies("Green Dragon Bat"				,0x00000012,0x00100004,0x2112,   44,  50,  12, 22, 13, 'b',  8, new int[]{  2 , 7}, new int[]{ 153,  0,   0,   0}, 16),
			new CreatureSpecies("Quasit"							,0x1103000A,0x000010FA,0x1004,   48,  20,  20, 30, 11, 'q',  0, new int[]{  5 , 8}, new int[]{ 176, 51,  51,   0}, 16),
			new CreatureSpecies("Troll"							,0x0F020002,0x00000000,0x2024,   64,  40,  20, 40, 11, 'T',  0, new int[]{ 17 , 8}, new int[]{   3,  3,  29,   0}, 17),
			new CreatureSpecies("Water Spirit"					,0x0000000A,0x00000000,0x1020,   58,  40,  12, 28, 12, 'E',  1, new int[]{  8 , 8}, new int[]{  13,  0,   0,   0}, 17),
			new CreatureSpecies("Giant Brown Scorpion"	   ,0x0000000A,0x00000000,0x0002,   62,  20,  12, 44, 11, 'S',  0, new int[]{ 11 , 8}, new int[]{  34, 86,   0,   0}, 17),
			new CreatureSpecies("Earth Spirit"					,0x0016000A,0x00000000,0x1200,   64,  50,  10, 40, 11, 'E',  2, new int[]{ 13 , 8}, new int[]{   7,  7,   0,   0}, 17),
			new CreatureSpecies("Fire Spirit"					,0x0000000A,0x00000000,0x3010,   66,  20,  16, 30, 12, 'E',  3, new int[]{ 10 , 8}, new int[]{ 101,  0,   0,   0}, 18),
			new CreatureSpecies("Uruk-Hai Orc"					,0x0B020002,0x00000000,0x2034,   68,  20,  20, 42, 11, 'o',  5, new int[]{ 14 , 8}, new int[]{  18,  0,   0,   0}, 18),
			new CreatureSpecies("Stone Giant"					,0x07020002,0x00000000,0x2204,   80,  50,  20, 40, 11, 'P',  3, new int[]{ 22 , 8}, new int[]{  20,  0,   0,   0}, 18),
			new CreatureSpecies("Stone Golem"					,0x00000002,0x00000000,0x1200,  100,  10,  12, 75, 10, 'g',  2, new int[]{ 28 , 8}, new int[]{   9,  9,   0,   0}, 19),
			new CreatureSpecies("Grey Ooze"						,0x07180022,0x00000000,0x10A0,   40,   1,  15, 10, 11, 'O',  0, new int[]{  6 , 8}, new int[]{ 127,  0,   0,   0}, 19),
			new CreatureSpecies("Disenchanter Ooze"			,0x07180022,0x00000000,0x10B0,   50,   1,  15, 15, 11, 'O',  1, new int[]{  6 , 8}, new int[]{ 205,  0,   0,   0}, 19),
			new CreatureSpecies("Giant Spotted Rat"			,0x0020000A,0x00000000,0x2072,    3,  20,   8, 20, 11, 'r',  6, new int[]{  4 , 3}, new int[]{ 155,  0,   0,   0}, 19),
			new CreatureSpecies("Mummified Kobold"				,0x0B020002,0x00000000,0x102C,   46,  75,  20, 24, 11, 'M',  0, new int[]{ 13 , 8}, new int[]{   5,  5,   0,   0}, 19),
			new CreatureSpecies("Killer Black Beetle"			,0x0000000A,0x00000000,0x0002,   75,  30,  12, 46, 11, 'K',  1, new int[]{ 18 , 8}, new int[]{  44,  0,   0,   0}, 19),
			new CreatureSpecies("Red Mold"						,0x00000001,0x00000000,0x3090,   64,  70,   2, 16, 11, 'm',  6, new int[]{ 17 , 8}, new int[]{ 108,  0,   0,   0}, 19),
			new CreatureSpecies("Quylthulg"						,0x00010004,0x00002017,0x5000,  200,   0,  10,	1, 11, 'Q',  0, new int[]{  4 , 8}, new int[]{   0,  0,   0,   0}, 20),
			new CreatureSpecies("Giant Red Bat"					,0x00000012,0x00000000,0x2162,   40,  20,  12, 24, 12, 'b',  9, new int[]{  5 , 8}, new int[]{  30, 51,  51,   0}, 20),
			new CreatureSpecies("Giant Black Dragon Fly"		,0x00000012,0x00200009,0x0072,   58,  50,  20, 22, 11, 'F',  7, new int[]{  4 , 8}, new int[]{ 141,  0,   0,   0}, 20),
			new CreatureSpecies("Cloud Giant"					,0x07020002,0x00000000,0x2034,  125,  50,  20, 44, 11, 'P',  4, new int[]{ 24 , 8}, new int[]{ 130,  0,   0,   0}, 20),
			new CreatureSpecies("Black Dragon Bat"				,0x00000012,0x00200004,0x2152,   50,  50,  12, 24, 13, 'b', 10, new int[]{  2 , 8}, new int[]{ 112,  0,   0,   0}, 21),
			new CreatureSpecies("Blue Dragon Bat"				,0x00000012,0x00080004,0x2052,   54,  50,  12, 26, 13, 'b', 11, new int[]{  3 , 6}, new int[]{ 131,  0,   0,   0}, 21),
			new CreatureSpecies("Mummified Orc"					,0x0B020002,0x00000000,0x102C,   56,  75,  20, 28, 11, 'M',  1, new int[]{ 14 , 8}, new int[]{  13, 13,   0,   0}, 21),
			new CreatureSpecies("Killer Boring Beetle"		,0x0000000A,0x00000000,0x0002,   70,  30,  12, 48, 11, 'K',  2, new int[]{ 18 , 8}, new int[]{  44,  0,   0,   0}, 21),
			new CreatureSpecies("Killer Stag Beetle"			,0x0000000A,0x00000000,0x0002,   80,  30,  12, 50, 11, 'K',  3, new int[]{ 20 , 8}, new int[]{  41, 10,   0,   0}, 22),
			new CreatureSpecies("Black Mold"						,0x00000081,0x00000000,0x10A0,   68,  50,   2, 18, 11, 'm',  7, new int[]{ 15 , 8}, new int[]{  21,  0,   0,   0}, 22),
			new CreatureSpecies("Iron Golem"						,0x00000002,0x00000000,0x1080,  160,  10,  12, 99,  9, 'g',  3, new int[]{ 80 , 8}, new int[]{  10, 10,   0,   0}, 22),
			new CreatureSpecies("Giant Yellow Scorpion"		,0x0000000A,0x00000000,0x0002,   60,  20,  12, 38, 11, 'S',  1, new int[]{ 12 , 8}, new int[]{  31,167,   0,   0}, 22),
			new CreatureSpecies("Green Ooze"						,0x073A0012,0x00000000,0x1030,    6,   1,  15,	5, 10, 'O',  2, new int[]{  4 , 8}, new int[]{ 116,  0,   0,   0}, 22),
			new CreatureSpecies("Black Ooze"						,0x073A0012,0x0001000B,0x1030,    7,   1,  10,	6,  9, 'O',  3, new int[]{  6 , 8}, new int[]{ 138,  0,   0,   0}, 23),
			new CreatureSpecies("Warrior"							,0x13020002,0x00000000,0x2030,   60,  40,  20, 40, 11, 'p', 21, new int[]{ 15 , 8}, new int[]{  18,  0,   0,   0}, 23),
			new CreatureSpecies("Red Dragon Bat"				,0x00000012,0x00800004,0x2152,   60,  50,  12, 28, 13, 'b', 12, new int[]{  3 , 8}, new int[]{ 105,  0,   0,   0}, 23),
			new CreatureSpecies("Killer Blue Beetle"			,0x0000000A,0x00000000,0x0002,   85,  30,  14, 50, 11, 'K',  4, new int[]{ 20 , 8}, new int[]{  44,  0,   0,   0}, 23),
			new CreatureSpecies("Giant Silver Ant"				,0x0000000A,0x00000000,0x0002,   45,  60,  10, 38, 11, 'a',  5, new int[]{  6 , 8}, new int[]{ 114,  0,   0,   0}, 23),
			new CreatureSpecies("Crimson Mold"					,0x00000001,0x00000000,0x10A0,   65,  50,   2, 18, 11, 'm',  8, new int[]{ 16 , 8}, new int[]{   2, 97,   0,   0}, 23),
			new CreatureSpecies("Forest Wight"					,0x0F02000A,0x0000100F,0x112C,  140,  30,  20, 30, 11, 'W',  0, new int[]{ 12 , 8}, new int[]{   5,  5, 187,   0}, 24),
			new CreatureSpecies("Berzerker"						,0x13020002,0x00000000,0x2030,   65,  10,  20, 20, 11, 'p', 22, new int[]{ 15 , 8}, new int[]{   7,  7,   0,   0}, 24),
			new CreatureSpecies("Mummified Human"				,0x0B020002,0x00000000,0x102C,   70,  60,  20, 34, 11, 'M',  2, new int[]{ 17 , 8}, new int[]{  13, 13,   0,   0}, 24),
			new CreatureSpecies("Banshee"							,0x0F15001A,0x0001002F,0x110C,   60,  10,  20, 24, 12, 'G',  4, new int[]{  6 , 8}, new int[]{  99,188,   0,   0}, 24),
			new CreatureSpecies("Giant Troll"					,0x0F020002,0x00000000,0x2024,   85,  50,  20, 40, 11, 'T',  1, new int[]{ 19 , 8}, new int[]{   5,  5,  41,   0}, 25),
			new CreatureSpecies("Giant Brown Tick"				,0x0000000A,0x00000000,0x0022,   70,  20,  12, 50, 10, 't',  2, new int[]{ 18 , 8}, new int[]{ 157,142,   0,   0}, 25),
			new CreatureSpecies("Killer Red Beetle"			,0x0000000A,0x00000000,0x0002,   85,  30,  14, 50, 11, 'K',  5, new int[]{ 20 , 8}, new int[]{  84,  0,   0,   0}, 25),
			new CreatureSpecies("Wooden Mold"					,0x00000001,0x00000000,0x10A0,  100,  50,   2, 50, 11, 'm',  9, new int[]{ 25 , 8}, new int[]{ 171,  0,   0,   0}, 25),
			new CreatureSpecies("Giant Blue Dragon Fly"		,0x00000012,0x00080009,0x0072,   75,  50,  20, 24, 11, 'F',  8, new int[]{  6 , 8}, new int[]{  29,  0,   0,   0}, 25),
			new CreatureSpecies("Giant Grey Ant Lion"			,0x0008000A,0x00000000,0x0032,   90,  40,  10, 40, 11, 'A',  0, new int[]{ 19 , 8}, new int[]{  39,  0,   0,   0}, 26),
			new CreatureSpecies("Disenchanter Bat"				,0x00000012,0x00000000,0x2162,   75,   1,  14, 24, 13, 'b', 13, new int[]{  4 , 8}, new int[]{ 204,  0,   0,   0}, 26),
			new CreatureSpecies("Giant Fire Tick"				,0x0000000A,0x00000000,0x2012,   90,  20,  14, 54, 11, 't',  3, new int[]{ 16 , 8}, new int[]{ 109,  0,   0,   0}, 26),
			new CreatureSpecies("White Wraith"					,0x0F02000A,0x0000100C,0x112C,  165,  10,  20, 40, 11, 'W',  1, new int[]{ 15 , 8}, new int[]{   5,  5, 189,   0}, 26),
			new CreatureSpecies("Giant Black Scorpion"	   ,0x0000000A,0x00000000,0x0002,   85,  20,  12, 50, 11, 'S',  2, new int[]{ 13 , 8}, new int[]{  32,167,   0,   0}, 26),
			new CreatureSpecies("Clear Ooze"						,0x0719000A,0x00000000,0x10B0,   12,   1,  10, 14, 11, 'O',  4, new int[]{  4 , 8}, new int[]{  90,  0,   0,   0}, 26),
			new CreatureSpecies("Killer Fire Beetle"			,0x0000000A,0x00000000,0x2012,   95,  30,  14, 45, 11, 'K',  6, new int[]{ 13 , 8}, new int[]{  41,110,   0,   0}, 27),
			new CreatureSpecies("Vampire"							,0x17020002,0x00001209,0x112C,  175,  10,  20, 45, 11, 'V',  0, new int[]{ 20 , 8}, new int[]{   5,  5, 190,   0}, 27),
			new CreatureSpecies("Giant Red Dragon Fly"	   ,0x00000012,0x00800008,0x2052,   75,  50,  20, 24, 11, 'F',  9, new int[]{  7 , 8}, new int[]{  96,  0,   0,   0}, 27),
			new CreatureSpecies("Shimmering Mold"				,0x00000081,0x00000000,0x10A0,  180,  50,   2, 24, 11, 'm', 10, new int[]{ 32 , 8}, new int[]{ 135,  0,   0,   0}, 27),
			new CreatureSpecies("Black Knight"					,0x13020002,0x0000010F,0x2034,  140,  10,  20, 60, 11, 'p', 23, new int[]{ 25 , 8}, new int[]{  23,  0,   0,   0}, 28),
			new CreatureSpecies("Mage"								,0x13020002,0x00002C73,0x2030,  150,  10,  20, 30, 11, 'p', 24, new int[]{ 10 , 8}, new int[]{  14,  0,   0,   0}, 28),
			new CreatureSpecies("Ice Troll"						,0x0F020002,0x00000000,0x0024,  160,  50,  20, 46, 11, 'T',  2, new int[]{ 22 , 8}, new int[]{   4,  4, 123,   0}, 28),
			new CreatureSpecies("Giant Purple Worm"			,0x0000000A,0x00000000,0x2032,  400,  30,  14, 65, 11, 'w',  5, new int[]{ 65 , 8}, new int[]{   7,113, 166,   0}, 29),
			new CreatureSpecies("Young Blue Dragon"			,0x1F00000A,0x0008100B,0x2005,  300,  70,  20, 50, 11, 'd',  0, new int[]{ 33 , 8}, new int[]{  52, 52,  29,   0}, 29),
			new CreatureSpecies("Young White Dragon"			,0x1F00000A,0x0040100B,0x0025,  275,  70,  20, 50, 11, 'd',  1, new int[]{ 32 , 8}, new int[]{  52, 52,  29,   0}, 29),
			new CreatureSpecies("Young Green Dragon"			,0x1F00000A,0x0010100B,0x2005,  290,  70,  20, 50, 11, 'd',  2, new int[]{ 32 , 8}, new int[]{  52, 52,  29,   0}, 29),
			new CreatureSpecies("Giant Fire Bat"				,0x00000012,0x00000000,0x2152,   85,  10,  14, 30, 12, 'b', 14, new int[]{  5 , 8}, new int[]{ 106, 52,  52,   0}, 29),
			new CreatureSpecies("Giant Glowing Rat"			,0x0020000A,0x00000000,0x2072,    4,  20,   8, 24, 11, 'r',  7, new int[]{  3 , 3}, new int[]{ 132,  0,   0,   0}, 29),
				// Now things are going to get tough.			 
				// Some of the creatures have Max hit points, denoted in 
				// their CDEFENSE flags as the '4000' bit set		 
			new CreatureSpecies("Skeleton Troll"				,0x00020002,0x00000000,0x500C,  225,  20,  20, 55, 11, 's',  4, new int[]{ 14 , 8}, new int[]{   5,  5,  41,   0}, 30),
			new CreatureSpecies("Giant Lightning Bat"			,0x00000012,0x00000000,0x2042,   80,  10,  15, 34, 12, 'b', 15, new int[]{  8 , 8}, new int[]{ 133, 53,  53,   0}, 30),
			new CreatureSpecies("Giant Static Ant"				,0x0000000A,0x00000000,0x0002,   80,  60,  10, 40, 11, 'a',  6, new int[]{  8 , 8}, new int[]{ 134,  0,   0,   0}, 30),
			new CreatureSpecies("Grave Wight"					,0x0F02000A,0x0000110A,0x512C,  325,  30,  20, 35, 11, 'W',  2, new int[]{ 12 , 8}, new int[]{   6,  6, 191,   0}, 30),
			new CreatureSpecies("Killer Slicer Beetle"	   ,0x0000000A,0x00000000,0x0002,  200,  30,  14, 55, 11, 'K',  7, new int[]{ 22 , 8}, new int[]{  48,  0,   0,   0}, 30),
			new CreatureSpecies("Giant White Ant Lion"	   ,0x0008000A,0x00000000,0x0022,  175,  40,  12, 45, 11, 'A',  1, new int[]{ 20 , 8}, new int[]{ 124,  0,   0,   0}, 30),
			new CreatureSpecies("Ghost"							,0x1715000A,0x0001002F,0x510C,  350,  10,  20, 30, 12, 'G',  5, new int[]{ 13 , 8}, new int[]{  99,192, 184,   0}, 31),
			new CreatureSpecies("Giant Black Ant Lion"	   ,0x0008000A,0x00000000,0x0032,  170,  40,  14, 45, 11, 'A',  2, new int[]{ 23 , 8}, new int[]{  39,119,   0,   0}, 31),
			new CreatureSpecies("Death Watch Beetle"			,0x0000000A,0x00000000,0x0002,  190,  30,  16, 60, 11, 'K',  8, new int[]{ 25 , 8}, new int[]{  47, 67,   0,   0}, 31),
			new CreatureSpecies("Ogre Mage"						,0x0B020002,0x0000A355,0x6034,  250,  30,  20, 42, 11, 'o',  6, new int[]{ 14 , 8}, new int[]{  19,  0,   0,   0}, 31),
			new CreatureSpecies("Two-Headed Troll"				,0x0F020002,0x00000000,0x6024,  275,  50,  20, 48, 11, 'T',  3, new int[]{ 14 , 8}, new int[]{   7,  7,  29,  29}, 32),
			new CreatureSpecies("Invisible Stalker"			,0x00030022,0x00000000,0x1000,  200,  20,  20, 46, 13, 'E',  4, new int[]{ 19 , 8}, new int[]{   5,  0,   0,   0}, 32),
			new CreatureSpecies("Giant Hunter Ant"				,0x00000002,0x00000000,0x0002,  150,   1,  16, 40, 11, 'a',  7, new int[]{ 12 , 8}, new int[]{  46,  0,   0,   0}, 32),
			new CreatureSpecies("Ninja"							,0x13020002,0x00000000,0x6034,  300,  10,  20, 65, 11, 'p', 25, new int[]{ 15 , 8}, new int[]{ 152, 80,   0,   0}, 32),
			new CreatureSpecies("Barrow Wight"					,0x0F02000A,0x00001308,0x512C,  375,  10,  20, 40, 11, 'W',  3, new int[]{ 13 , 8}, new int[]{   7,  7, 193,   0}, 33),
			new CreatureSpecies("Skeleton 2-Headed Troll"	,0x00020002,0x00000000,0x500C,  325,  20,  20, 48, 11, 's',  5, new int[]{ 20 , 8}, new int[]{   8,  8,  28,  28}, 33),
			new CreatureSpecies("Water Elemental"				,0x0008000A,0x00000000,0x1020,  325,  50,  12, 36, 11, 'E',  5, new int[]{ 25 , 8}, new int[]{   9,  9,   0,   0}, 33),
			new CreatureSpecies("Fire Elemental"				,0x0008000A,0x00000000,0x3010,  350,  70,  16, 40, 10, 'E',  6, new int[]{ 25 , 8}, new int[]{ 103,  0,   0,   0}, 33),
			new CreatureSpecies("Lich"								,0x1F020002,0x00019F75,0x510C,  750,  60,  20, 50, 11, 'L',  0, new int[]{ 25 , 8}, new int[]{ 179,194, 214,   0}, 34),
			new CreatureSpecies("Master Vampire"				,0x17020002,0x00001307,0x512C,  700,  10,  20, 55, 11, 'V',  1, new int[]{ 23 , 8}, new int[]{   5,  5, 195,   0}, 34),
			new CreatureSpecies("Spirit Troll"					,0x17150002,0x00000000,0x510C,  425,  10,  20, 40, 11, 'G',  6, new int[]{ 15 , 8}, new int[]{  53, 53,  29, 185}, 34),
			new CreatureSpecies("Giant Red Scorpion"			,0x0000000A,0x00000000,0x0002,  275,  40,  12, 50, 12, 'S',  3, new int[]{ 18 , 8}, new int[]{  29,165,   0,   0}, 34),
			new CreatureSpecies("Earth Elemental"				,0x001E000A,0x00000000,0x1200,  375,  90,  10, 60, 10, 'E',  7, new int[]{ 30 , 8}, new int[]{  22, 22,   0,   0}, 34),
			new CreatureSpecies("Young Black Dragon"			,0x1F00000A,0x0020100B,0x6005,  600,  50,  20, 55, 11, 'd',  3, new int[]{ 32 , 8}, new int[]{  53, 53,  29,   0}, 35),
			new CreatureSpecies("Young Red Dragon"				,0x1F00000A,0x0080100A,0x6015,  650,  50,  20, 60, 11, 'd',  4, new int[]{ 36 , 8}, new int[]{  54, 54,  37,   0}, 35),
			new CreatureSpecies("Necromancer"					,0x13020002,0x00005763,0x6030,  600,  10,  20, 40, 11, 'p', 26, new int[]{ 17 , 8}, new int[]{  15,  0,   0,   0}, 35),
			new CreatureSpecies("Mummified Troll"				,0x0F020002,0x00000000,0x502C,  400,  50,  20, 38, 11, 'M',  3, new int[]{ 18 , 8}, new int[]{  15, 15,   0,   0}, 35),
			new CreatureSpecies("Giant Red Ant Lion"			,0x0008000A,0x00000000,0x2012,  350,  40,  14, 48, 11, 'A',  3, new int[]{ 23 , 8}, new int[]{ 107,  0,   0,   0}, 35),
			new CreatureSpecies("Mature White Dragon"			,0x2F00000A,0x0040100A,0x4025, 1000,  70,  20, 65, 11, 'd',  5, new int[]{ 48 , 8}, new int[]{  54, 54,  37,   0}, 35),
			new CreatureSpecies("Xorn"								,0x00160002,0x00000000,0x4200,  650,  10,  20, 80, 11, 'X',  0, new int[]{ 20 , 8}, new int[]{   5,  5,   5,   0}, 36),
			new CreatureSpecies("Giant Mottled Ant Lion"		,0x0008000A,0x00000000,0x0032,  350,  40,  14, 50, 12, 'A',  4, new int[]{ 24 , 8}, new int[]{  38,  0,   0,   0}, 36),
			new CreatureSpecies("Grey Wraith"					,0x0F02000A,0x00001308,0x512C,  700,  10,  20, 50, 11, 'W',  4, new int[]{ 23 , 8}, new int[]{   9,  9, 196,   0}, 36),
			new CreatureSpecies("Young Multi-Hued Dragon"	,0x4F00000A,0x00F81005,0x6005, 1250,  50,  20, 55, 11, 'd',  6, new int[]{ 40 , 8}, new int[]{  55, 55,  38,   0}, 36),
			new CreatureSpecies("Mature Blue Dragon"			,0x2F00000A,0x00081009,0x6005, 1200,  70,  20, 75, 11, 'd',  7, new int[]{ 48 , 8}, new int[]{  54, 54,  38,   0}, 36),
			new CreatureSpecies("Mature Green Dragon"			,0x2F00000A,0x0010100A,0x6005, 1100,  70,  20, 70, 11, 'd',  8, new int[]{ 48 , 8}, new int[]{  52, 52,  29,   0}, 36),
			new CreatureSpecies("Iridescent Beetle"			,0x0000000A,0x00000000,0x0002,  850,  30,  16, 60, 11, 'K',  9, new int[]{ 32 , 8}, new int[]{  45, 10, 146,   0}, 37),
			new CreatureSpecies("King Vampire"					,0x17020002,0x00001307,0x512C, 1000,  10,  20, 65, 11, 'V',  2, new int[]{ 38 , 8}, new int[]{   5,  5, 198,   0}, 37),
			new CreatureSpecies("King Lich"						,0x1F020002,0x00019F73,0x510C, 1400,  50,  20, 65, 11, 'L',  1, new int[]{ 52 , 8}, new int[]{ 180,197, 214,   0}, 37),
			new CreatureSpecies("Mature Red Dragon"			,0x2F00000A,0x00801808,0x6015, 1400,  30,  20, 80, 11, 'd',  9, new int[]{ 60 , 8}, new int[]{  56, 56,  39,   0}, 37),
			new CreatureSpecies("Mature Black Dragon"			,0x2F00000A,0x00201009,0x6005, 1350,  30,  20, 55, 11, 'd', 10, new int[]{ 58 , 8}, new int[]{  54, 54,  38,   0}, 37),
			new CreatureSpecies("Mature Multi-Hued Dragon"	,0x6F00000A,0x00F81A05,0x6005, 1650,  50,  20, 65, 11, 'd', 11, new int[]{ 80 , 8}, new int[]{  56, 56,  39,   0}, 38),
			new CreatureSpecies("Ancient White Dragon"	   ,0x4F000002,0x00401A09,0x4025, 1500,  80,  20, 80, 12, 'D',  0, new int[]{ 88 , 8}, new int[]{  54, 54,  37,   0}, 38),
			new CreatureSpecies("Emperor Wight"					,0x1B02000A,0x00001306,0x512C, 1600,  10,  20, 40, 12, 'W',  5, new int[]{ 48 , 8}, new int[]{  10, 10, 199,   0}, 38),
			new CreatureSpecies("Black Wraith"					,0x1F02000A,0x00001307,0x512C, 1700,  10,  20, 55, 11, 'W',  6, new int[]{ 50 , 8}, new int[]{  10, 10, 200,   0}, 38),
			new CreatureSpecies("Nether Wraith"					,0x1F07000A,0x00005316,0x512C, 2100,  10,  20, 55, 11, 'W',  7, new int[]{ 58 , 8}, new int[]{  10, 10, 202,   0}, 39),
			new CreatureSpecies("Sorcerer"						,0x1F020002,0x0000FF73,0x6030, 2150,  10,  20, 50, 12, 'p', 27, new int[]{ 30 , 8}, new int[]{  16,  0,   0,   0}, 39),
			new CreatureSpecies("Ancient Blue Dragon"			,0x4F000002,0x00081A08,0x6005, 2500,  80,  20, 90, 12, 'D',  1, new int[]{ 87 , 8}, new int[]{  55, 55,  39,   0}, 39),
			new CreatureSpecies("Ancient Green Dragon"	   ,0x4F000002,0x00101A09,0x6005, 2400,  80,  20, 85, 12, 'D',  2, new int[]{ 90 , 8}, new int[]{  54, 54,  38,   0}, 39),
			new CreatureSpecies("Ancient Black Dragon"	   ,0x4F000002,0x00201A07,0x6005, 2500,  70,  20, 90, 12, 'D',  3, new int[]{ 90 , 8}, new int[]{  55, 55,  38,   0}, 39),
			new CreatureSpecies("Crystal Ooze"					,0x073B000A,0x00000000,0x10A0,    8,   1,  10, 30,  9, 'O',  5, new int[]{ 12 , 8}, new int[]{ 128,  0,   0,   0}, 40),
			new CreatureSpecies("Disenchanter Worm"			,0x00200022,0x00000000,0x01B2,   30,  10,   7,	5, 10, 'w',  6 ,new int[]{ 10 , 8}, new int[]{ 208,  0,   0,   0}, 40),
			new CreatureSpecies("Rotting Quylthulg"			,0x00010004,0x00004014,0x5000, 1000,   0,  20,	1, 12, 'Q',  1, new int[]{ 12 , 8}, new int[]{   0,  0,   0,   0}, 40),
			new CreatureSpecies("Ancient Red Dragon"			,0x6F000002,0x00801E06,0x6015, 2750,  70,  20,100, 12, 'D',  4, new int[]{105 , 8}, new int[]{  56, 56,  40,   0}, 40),
			new CreatureSpecies("Death Quasit"					,0x1103000A,0x000010FA,0x1004, 1000,   0,  20, 80, 13, 'q',  1, new int[]{ 55 , 8}, new int[]{ 177, 58,  58,   0}, 40),
			new CreatureSpecies("Emperor Lich"					,0x2F020002,0x00019F72,0x510C,10000,  50,  20, 75, 12, 'L',  2, new int[]{ 38 ,40}, new int[]{ 181,201, 214,   0}, 40),
			new CreatureSpecies("Ancient Multi-Hued Dragon"	,0x7F000002,0x00F89E05,0x6005,12000,  70,  20,100, 12, 'D',  5, new int[]{ 52 ,40}, new int[]{  57, 57,  42,   0}, 40),
				// Winning creatures should follow here.			 
				// Winning creatures are denoted by the 32 bit in CMOVE		 
				// Iggy is not a win creature, just a royal pain in the ass.	 
			new CreatureSpecies("Evil Iggy"						,0x7F130002,0x0001D713,0x5004,18000,   0,  30, 80, 12, 'p', 28, new int[]{ 60 ,40}, new int[]{  81,150,   0,   0}, 50),
				// Here is the only actual win creature.			 
			new CreatureSpecies("Balrog"							,0xFF1F0002,0x0081C743,0x5004,55000,   0,  40,125, 13, 'B',  0, new int[]{ 75 ,40}, new int[]{ 104, 78,214,   0},  100),

		#endregion
		};

    }
}
